<%@page import="com.qdu.dao.Fenlei"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@page import="java.*"%>

<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <script type="text/JavaScript">
        function sub()
        {
	
                        window.location.href="/J02_T13_P04/admin/addfenlei.jsp";

        }
        function sub4()
        {
	
		
		
                                document.form1.method.value="del";
                                form1.submit();
		

        }
        </script>
    </head>
    <%
        String message = (String) request.getAttribute("message");
        if (message == null) {
            message = "";
        }
        if (!message.trim().equals("")) {
            out.println("<script language='javascript'>");
            out.println("alert('" + message + "');");
            out.println("</script>");
        }
        request.removeAttribute("message");

    %>

    <%String name = (String) session.getAttribute("name");
        if (name == null) {
            response.sendRedirect("/J02_T13_P04/admin/login.jsp");
        } else {
    %>
    <body >
        <form action="../fls" method="post" name="form1">
            <table width="100%" height="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td height="121" align="center" valign="top" bgcolor="#FFFFFF"><div align="left"><br>
                            <span class="black14">　<strong>当前位置:</strong>图书分类管理</span><br>
                        </div>
                        <table width="98%" cellpadding="0" cellspacing="0">

                            <TR bgcolor="#cccccc">
                                <TD align="center" bgColor=#ffffff><br>
                                    <br>

                                    <table width="675" cellspacing="0" cellpadding="0" border="1">
                                        <tr><input type="hidden" name="hidden3" value="haha">
                                        <td height="30"  align="center" bordercolor="#669999" bgcolor="#99CCCC" ><p>序号</p></td>
                                        <td height="30"  align="center" bordercolor="#669999" bgcolor="#99CCCC" >分类列表</td>
                                        <td height="30"  align="center" bordercolor="#669999" bgcolor="#99CCCC" >建立时间</td>
                                        <td height="30"  align="center" bordercolor="#669999" bgcolor="#99CCCC" >选择</td>
                            </tr>
                            <%
                                Fenlei fl = new Fenlei();
                                List list = fl.getFenLei();
                                for (int j = 0; j < list.size(); j++) {
                                    List list2 = (List) list.get(j);
                            %>
                            <tr>
                                <td height="30" align="center" bordercolor="#669999" bgcolor="#FFFFFF"><%=j + 1%></td>
                                <td height="30" align="center" bordercolor="#669999" bgcolor="#FFFFFF"><%=list2.get(1).toString()%></td>
                                <td height="30" align="center" bordercolor="#669999" bgcolor="#FFFFFF"><%=list2.get(2).toString()%></td>
                                <td height="30" align="center" bordercolor="#669999" bgcolor="#FFFFFF"><input type="checkbox" name="choose"  value="<%=list2.get(0).toString().trim()%>"></td>
                            </tr>	
                            <%}%>
                        </table>


                <tr>

                <table align="center" width="550" cellpadding="0" cellspacing="0">
                    <tr><input type="hidden" name="method" value="update">
                    <td align="center"><input type="button" name="button" value="增加" onClick="sub()"></td>

                    <td align="center"><input type="button" name="button3" value="删除" onClick="sub4()"></td>

                    </tr>
                </table>
                </tr>
            </table>
            <br>
            <br></TD>
            </TR>
            </table></td>
            </tr>
            </table>
        </form>
    </body>
    <%}%>
</html>
